Description of Semantics and Code Generation Possibilities for a Multi-Language Interpreter

نویسنده

  • Guntis Arnicans
چکیده

In this paper we describe the definition of semantics for a Multi-Language interpreter (MLI), which provides the execution of the given program, receiving and exploiting corresponding language syntax and the desired semantics. We analyze the simplest solution – the MLI receives the language syntax and the semantics descriptions, which have already been compiled to executable objects. Semantics is defined as a composition from several semantic aspects, considering the pragmatics of a language. Semantic aspects are translated to semantic functions by composing descriptions of the aspects. A traversing program’s intermediate representation and the calling out of semantic functions similarly to the principle of the Visitor pattern perform the desired semantics. To simplify the semantic descriptions, we use abstract components that are joined by connectors at the meta-level. The implementation of these components and connectors can be very different. Examples of conventional and specific semantics are given for the simple imperative language in this paper.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

From Interpreter to Compiler using Staging and Monads

In writing this paper we had two goals. First, to promote MetaML, a programming language for writing staged programs, and second, to demonstrate that staging a program can have signi cant bene ts. We do this by example: the derivation of an executable compiler for a small language. We derive the compiler in a rigorous fashion from a semantic description of the language. This is done by staging ...

متن کامل

Automatic Generation of a Multi Agent System for Crisis Management by a Model Driven Approach

Considering the increasing occurrences of unexpected events and the need for pre-crisis planning in order to reduce risks and losses, modeling instant response environments is needed more than ever. Modeling may lead to more careful planning for crisis-response operations, such as team formation, task assignment, and doing the task by teams. A common challenge in this way is that the model shou...

متن کامل

Animating the Formalised Semantics of a Java-Like Language

Considerable effort has gone into the techniques of extracting executable code from formal specifications and animating them. We show how to apply these techniques to the large JinjaThreads formalisation. It models a substantial subset of multithreaded Java source and bytecode in Isabelle/HOL and focuses on proofs and modularity whereas code generation was of little concern in its design. Emplo...

متن کامل

JASON Java-based AgentSpeak interpreter used with saci for multi-agent distribution over the net

In this survey paper we present Jason, an interpreter for the AgentSpeak programming language. Our aim is to investigate the Jason platform theoretically and to explore its practical possibilities in implementing multiagent systems. Furthermore we introduce some relevant background on multiagent systems concerning the BDI architecture and the logic-based semantics of AgentSpeak(L). Finally, we ...

متن کامل

Semantics-Directed Compiler Generation

This dissertation concerns the design and implementation of SemCom, an interpreter generator for arbitrary languages, which compiles a two-level operational semantics (in either bigor small-step style). Input to SemCom is expressed in a purpose-designed Semantic Description Language (SDL). An SDL file contains the definition of an evaluation and typing relation, and can express type systems up ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007